gdk/events: Add constructor for high-resolution scroll events
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 20 Sep 2021 17:59:35 +0000 (19:59 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 10 Aug 2022 14:23:58 +0000 (14:23 +0000)
commit51ca454eef480886c5f5e584e5b8c24631f932ab
tree436ca94f7e53cf48dd05f40d2ebbe4db69a4d555
parentfb100d719fd2b17b3397999f600d69462fe581d5
gdk/events: Add constructor for high-resolution scroll events

Starting with Linux Kernel v5.0 two new axes are available for
mice that support high-resolution wheel scrolling: REL_WHEEL_HI_RES and
REL_HWHEEL_HI_RES.

Both axes send data in fractions of 120 where each multiple of 120
amounts to one logical scroll event. Fractions of 120 indicate a wheel
movement less than one detent.

The 120 magic number is a copy of the Windows API, so this new
constructor can be used both in Linux >= 5.0 and Windows >= Vista.
gdk/gdkevents.c
gdk/gdkeventsprivate.h